{extend name="base" /}
{block name="seo"}
<title>注册新用户 - {$site.name}</title>
<meta name="keywords" content="{$site.keywords}">
<meta name="description" content="{$site.description}">
{/block}
{block name="css"}
<link href="__HOME__/css/user.css" rel="stylesheet" type="text/css">
<link href="__HOME__/css/login.css" rel="stylesheet" type="text/css">
<style>
    .session-form__header {
        margin-top: 40px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        margin-bottom: 24px;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
        -webkit-box-align: end;
        -ms-flex-align: end;
        align-items: flex-end;
    }

.loginapp{

}

 .loginapp + .loginapp {
        margin-left: 48px !important
    }

</style>
{/block}
{block name="body"}
<div class="container">
    <div class="user-login">
        <div class="box fl">
        </div>
        <div class="login fl">

            <form class="layui-form" name="form1" id='registerForm'>
                <div class="session-form__header">
                    <h2 class="session-form__title">
                        <span>注册</span>
                    </h2>
                    <span class="pull-right">已有帐号？ <a href="{:url('user/login/index')}">点此登录</a></span>
                </div>
                <input type="hidden" id="login_type" name="login_type" value="common">

                <div class="layui-form-item">
                    <span><i class="layui-icon layui-icon-username"></i></span>
                    <input type="text" id="username" name="username" placeholder="用户名" class="layui-input"/>
                </div>
                <div class="layui-form-item" id="password-div">
                    <span><i class="layui-icon layui-icon-password"></i></span>
                    <input type="password" id="password" name="password" placeholder="密码" class="layui-input"/>
                </div>

                <div class="layui-form-item">
                    <span><i class="layui-icon layui-icon-vercode"></i></span>
                    <input type="text" id="captcha" name="captcha" placeholder="图形码" class="layui-input"/>
                    <img src="{:url('user/login/captcha')}"
                         onclick="this.src='{:url('user/login/captcha')}?'+Math.random();"
                         style="float:left; height:38px;cursor:pointer;" id="captchaPic" title="点击我更换图片" alt="点击我更换图片">
                </div>


                <div class="layui-form-item">

                    <button style="cursor:pointer;" class="layui-btn" lay-submit lay-filter="register" >注册并登录</button>

                </div>


                <?php  $appLoginArr=sysconfig('applogin.login_types');?>
                {if $appLoginArr}
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px">
                    <legend style="margin: 0 20px 20px 0;
    padding: 0 20px;
    text-align: center;font-size: 15px">其它方式登录</legend>
                    <p class="login-icon" style="text-align: center">
                        {if in_array('qq',$appLoginArr)}
                        <a href="/oauth/qq.html"
                           onclick="layer.msg('正在通过QQ登录', {icon:16, shade: 0.1, time:0})" class="loginapp">
                            <i class="icon-logo-qq iconfont qq" title="使用QQ帐号登录"></i></a>{/if}
                        {if in_array('wechart',$appLoginArr)}
                        <a href="/oauth/wechart.html"
                           onclick="layer.msg('正在使用微信登录', {icon:16, shade: 0.1, time:0})" class="loginapp">
                            <i class="icon-logo_wechat iconfont wechat" title="使用微信登录"></i></a>
                        {/if}  {if in_array('alipay',$appLoginArr)}
                        <a href="/oauth/alipay.html"
                           onclick="layer.msg('正在通过支付宝账号登录', {icon:16, shade: 0.1, time:0})" class="loginapp">
                            <img src="__STATIC__/common/images/app_ico/alipay.png" height="32" style="margin-top:-16px" title="使用支付宝帐号登录"/></a>
                        {/if}  {if in_array('dingtalk',$appLoginArr)}
                        <a href="/oauth/dingtalk.html"
                           onclick="layer.msg('正在通过钉钉登录', {icon:16, shade: 0.1, time:0})" class="loginapp">
                            <i class="dingding icon-logo-dingding iconfont" title="使用钉钉帐号登录"></i></a>
                        {/if}

                    </p>
                </fieldset>

                {/if}
            </form>
        </div>

    </div>
</div>
{/block}
{block name="js"}
<script src="__HOME__/js/user.js"></script>
{/block}